package com.terren.spider.db.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.terren.spider.db.basic.BasicServiceSupportImpl;
import com.terren.spider.db.service.TiebaUserService;
import com.terren.spider.entity.biz.TiebaUser;

@Service("tiebaUserService")
public class TiebaUserServiceImpl extends BasicServiceSupportImpl implements TiebaUserService{
	private final String SQL_MAPPER = "tiebaUserMapper.";

	@Override
	public void save(List<TiebaUser> items) throws Exception {
		basicDao.save(SQL_MAPPER+"addTiebaUser", items);
	}

	@Override
	public List<TiebaUser> getTiebaUserDetailList() throws Exception {
		return basicDao.findForList(SQL_MAPPER + "getAllTiebaUsers", null);
	}

	@Override
	public void updateProgressStatus(List<TiebaUser> users) throws Exception {
		basicDao.save(SQL_MAPPER + "updateProgressStatus", users);
		
	}

	@Override
	public void updateDoneStatus(List<TiebaUser> users) throws Exception {
		basicDao.save(SQL_MAPPER + "updateDoneStatus", users);
		
	}

	@Override
	public void updateFetchtimes(List<TiebaUser> users) throws Exception {
		basicDao.save(SQL_MAPPER + "updateFetchtimes", users);
		
	}

	@Override
	public void saveDetail(List<TiebaUser> items) throws Exception {
		basicDao.save(SQL_MAPPER+"addTiebaUserDetail", items);
		
	}
	
	
}
